//
//  TestSort.m
//  TestDemo
//
//  Created by fengxijun on 2/25/16.
//  Copyright © 2016 goappbox. All rights reserved.
//

#import "TestSort.h"
#import "NSDate+Extension.h"

@implementation TestSort

- (NSComparisonResult)compare:(TestSort *)item
{
//    if (self.month < item.month) {
//        return NSOrderedAscending;
//    }
//    return NSOrderedDescending;
    NSLog(@"%@",self.yearMonth);
    return [self.yearMonth compare:item.yearMonth];
}

- (NSDate *)yearMonth
{
    return [[self dateTm] yearMonth];
}

- (NSString *)description
{
    return [NSString stringWithFormat:@"%@",[self.yearMonth description]];
}

@end
